from django.contrib import admin
from hosting.profiles.models import Profile, Plan, IP

class ProfileAdmin(admin.ModelAdmin):
    fieldsets = (
        (None, {'fields':('user','ip', 'plan', 'status', 'sites_used', 'databases_used', 'quota_used')}),
    )
    list_display = ('user','ip','plan','status','sites_used','databases_used','quota_used')
    list_filter = ('ip',)
admin.site.register(Profile,ProfileAdmin)

class PlanAdmin(admin.ModelAdmin):
    fieldsets = (
        (None, {'fields':('name','sites_max','databases_max','quota_max')}),
    )
    list_display = ('name', 'sites_max','databases_max','quota_max')
admin.site.register(Plan,PlanAdmin)

class IPAdmin(admin.ModelAdmin):
    fieldsets = (
        (None, {'fields':('ip',)}),
    )
    list_display = ('ip','is_selected')
admin.site.register(IP,IPAdmin)
